#!/usr/bin/env bash

if [ $# -gt 1 ]; then
    echo -e "
Usage:
    dc [keyword]
"
    exit 1
fi

if [ $# = 0 ]; then
    docker ps -a --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
else
    docker ps -a --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" | grep --color=auto -i $*
fi
